package com.project.controller;

import com.project.bean.GradeBean;
import com.project.bean.SupplierBean;
import com.project.mapper.IGradeMapper;
import com.project.service.IGradeService;
import com.project.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

@RestController
@RequestMapping("grade")
public class GradeController {
    @Autowired
    private IGradeService gradeService;

    @RequestMapping("findByRole")
    public Set<GradeBean> findByRole(Integer[] roleIdArray) {
        return gradeService.findByRole(roleIdArray);
    }

    @RequestMapping("findAll")
    public List<GradeBean> findAll() {
        return gradeService.findAll();
    }


}
